package com.liuche.pictureserver.controller;

import com.liuche.pictureserver.aop.annotation.Login;
import com.liuche.pictureserver.common.resp.BaseResponse;
import com.liuche.pictureserver.common.resp.ResUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuche
 */
@Tag(name = "testController")
@RestController
@RequestMapping("/test")
public class TestController {
    @Operation(summary = "hello接口测试")
    @GetMapping("/hello")
    public String testHello() {
        return "我说hello你说hi";
    }

    @Login
    @Operation(summary = "健康检查接口")
    @GetMapping("/health")
    public BaseResponse<String> health() {
        return ResUtils.success("yes");
    }
}
